In recent years, along with rapid popularization of the Internet and continuous increase of multimedia service demands, a link rate of a network is increased to 100 Gb/s and even higher. In order to design a switching device meeting a network requirement, it is needed to make researches on a high-speed searching algorithm.
At present, devices for high-speed searching usually include a Content Addressable Memory (CAM) and a Ternary Content Addressable Memory (TCAM). Each storage unit of a CAM includes an embedded comparison logic, thus, data written into the CAM may be compared with each piece of internally stored data, and addresses of all internal data the same as the port data may be returned. Generally speaking, a Random Access Memory (RAM) is a storage unit for reading and writing data according to an address. On the contrary, a CAM returns an address matched with a port data content; each bit in a TCAM has three states, including a “0” state, a “1” state and a “don't care” state, which is why the TCAM is “ternary”. It is just the third state of the TCAM which enables the TCAM to implement accurate matching searching and fuzzy matching searching. While, the CAM does not have the third state, so that the CAM may only implement accurate matching searching.
The TCAM and the CAM both have the advantages including high searching speed and simplicity in operation, but they also have three obvious defects: high cost, high power consumption and configuration updating complexity.